package com.shuai.stickynote;

import android.os.Parcel;
import android.os.Parcelable;

public class StickyNote implements Parcelable {
    private String id, time, type, content, title, group;
    private int complete, delete;

    public StickyNote() {}

    public StickyNote(String id, String time, String type, String content, String title, String group, int complete, int delete) {
        this.id = id;
        this.time = time;
        this.type = type;
        this.content = content;
        this.title = title;
        this.group = group;
        this.complete = complete;
        this.delete = delete;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public int getComplete() {
        return complete;
    }

    public void setComplete(int complete) {
        this.complete = complete;
    }

    public int getDelete() {
        return delete;
    }

    public void setDelete(int delete) {
        this.delete = delete;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public StickyNote(Parcel in){
        this.id = in.readString();
        this.time = in.readString();
        this.type = in.readString();
        this.content = in.readString();
        this.title = in.readString();
        this.group = in.readString();
        this.complete = in.readInt();
        this.delete = in.readInt();
    }

    public static final Creator<StickyNote> CREATOR = new Creator<StickyNote>() {
        @Override
        public StickyNote createFromParcel(Parcel source) {
            return new StickyNote(source);
        }

        @Override
        public StickyNote[] newArray(int size) {
            return new StickyNote[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(time);
        dest.writeString(type);
        dest.writeString(content);
        dest.writeString(title);
        dest.writeString(group);
        dest.writeInt(complete);
        dest.writeInt(delete);
    }
}
